package com.cn.wanxi.service;

import com.cn.wanxi.dao.ExamMaintainDao;
import com.cn.wanxi.entity.ExamMaintainEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author:LLH
 * @Date:2020/3/16 9:42
 * @Description: 试题维护service层
 */

@Service
public class ExamMaintainService {
    @Autowired
    private ExamMaintainDao examMaintainDao;

    public List<ExamMaintainEntity> findAll(){
        return examMaintainDao.findAll();
    }

    public ExamMaintainEntity findById(int question_id){
        return examMaintainDao.getById(question_id);
    }

    public int add(ExamMaintainEntity examMaintainEntity) {
        return examMaintainDao.add(examMaintainEntity);
    }

    public int del(int question_id){
        return examMaintainDao.del(question_id);
    }

    public int update(ExamMaintainEntity examMaintainEntity){
        return examMaintainDao.update(examMaintainEntity);
    }

    public List<ExamMaintainEntity> findAllType(){
        return examMaintainDao.findAllType();
    }//难易程度下拉框

    public List<ExamMaintainEntity> findAllLevel(){
        return examMaintainDao.findAllLevel();
    }//难易程度下拉框

    public List<ExamMaintainEntity> findAllDirection(){
        return examMaintainDao.findAllDirection();
    }//难易程度下拉框

}
